<template>
  <div>
    <el-dialog title="转正" :visible="isShow" width="50%" @close="closeEvent">
     <Header></Header>
      <el-form label-width="150px" >
        <el-form-item label="日期">
          <el-date-picker v-model="rowList.timeOfEntry" type="date"></el-date-picker>
        </el-form-item>
        <el-form-item label="文本">
          <el-input type="textarea" :rows="2"></el-input>
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="footer">
          <el-button @click="closeEvent">取 消</el-button>
          <el-button type="primary" @click="submit">确 定</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script>
import Header from './header.vue'
import {employeesPositive}from '@/api/employees'
export default {
  name: 'dialogRow',
  props: {
    isShow: {
      type: Boolean,
      default: false
    },
    rowList:{
      type:[Object,Array],
      default:()=>({})
    }
    
  },
  components:{
    Header
    },

  data () {
    return {
      form:{
timeOfEntry:''
      },
      circleUrl:
        'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
    }
  },
  created(){
console.log('111',this.rowList.id);
  },
  methods: {
    closeEvent () {
      this.$emit('update:isShow', false)
    },
   async submit(){
// const res=await employeesPositive({id:this.rowList})
const res=await employeesPositive(this.$store.state.user.userInfo.id)
this.$message.success('转正成功')
this.closeEvent()
console.log('转正',res);
    }
  }
}
</script>

<style lang="scss" scoped>
.footer{
  text-align: center;
}
.demo-avatar{
  padding-left: 50px;
}
.right{
  padding-left: 20px;
}
</style>
